#!/bin/bash

read -p "user name: " name

grep -q "^$name:" /etc/passwd && echo exists || echo not exists

# if grep -q "^$name:" /etc/passwd; then
#     echo "$name exists"
# else
#     echo "$name not exists"
# fi
